<?php
/**
 * Yii view form
 *
 * @author <KTD SOFT>
 * @since Jan 11, 2013 - 2:46:02 PM
 */
$this->widget('MyActiveForm', array(
    'model'   => $this->model,
    'title'   => $this->pageTitle,
    'columns' => array(
        array(
            'field'       => 'title',
            'htmlOptions' => array('class' => "span10"),
        ),
        array(
            'field'       => 'title_url',
            'htmlOptions' => array('class' => "span10"),
        ),
        array(
            'field'       => 'summary',
            'type'        => 'textArea',
            'htmlOptions' => array('class' => "resize-text span10"),
        ),
        array(
            'field' => 'content',
            'type'  => 'editor',
        ),
        array(
            'field' => 'thumbnail',
            'type'  => 'image',
        ),
//        array(
//            'field' => 'tags',
//            'htmlOptions' => array('class' => "tags_input"),
//        ),
        array(
            'field'       => 'meta_desc',
            'type'        => 'textArea',
            'htmlOptions' => array('class' => "resize-text span8"),
        ),
        'rank',
        array(
            'field'       => 'status',
            'type'        => 'dropDownList',
            'data'        => Post::getArrayStatus(),
            'htmlOptions' => array('class' => ""),
        ),
    ),
));
?>
<script>
    $(function () {
        $('#CustomerNews_title').keyup(function () {
            title = $('#CustomerNews_title').val();
            $('#CustomerNews_title_url').val(convertToSlug(title));
        });
    });
</script>